# -*- coding: utf-8 -*-
"""
controller for index
"""
from framework.controller import Controller
import json

class DefaultCtrl(Controller):
    """
    action index method
    """
    def get(self):
        """default handler"""
        self.write_error(404)

    def write_error(self, status_code, **kwargs):
        if status_code == 404:
            # self.render('404.html')
            self.write('404')
        elif status_code == 500:
            # self.render('500.html')
            self.write('500')
        else:
            # self.render('err.html')
            self.write('error:%s' % status_code)
